/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package SIMRS.Radiologi.widget;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 *
 * @author Joe
 */
public class PnlImage extends JPanel {
    private Image gambar;
 public PnlImage () {
        gambar = new ImageIcon(getClass().getResource("/SIMRS/Radiologi/gambar/Radiologi.jpg")).getImage();
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);

        Graphics2D g2 = (Graphics2D) g.create();
        g2.drawImage(gambar, 0, 0, getWidth(), getHeight(), null);

        g2.dispose();
    }
}
